/*
* @Author: wanghongfucoder
* @Date:   2017-03-08 15:26:44
* @Last Modified by:   wanghongfucoder
* @Last Modified time: 2017-03-08 15:33:21
*/

public class NameRepository implements Container {

	public String name[] = {"robert","john","julie","lora"};

	public Iterator getIterator(){
		return new NameIterator();
	}
	private class NameIterator implements Iterator {
		int index;
		public boolean hasNext(){
			if (index<name.length) {
				return true;
			}
			return false;
		}
		public Object next(){
		if (this.hasNext()) {
			return name[index++];
		}
		return null;
	}
	}


}